/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pin.db.procedures;

/**
 *
 * @author didyhu
 */
public class WhereCondition{
String condition;
    private String table;
    private String column;
    private String relationShip;
    private Object[] value;
    private Class[] valueClass;
    private String rel = "";
/*
    public String getColumn() {
        return column;
    }

    public String getRelationShip() {
        return relationShip;
    }

    public Object getValue() {
        return value;
    }

    public Class getValueClass() {
        return valueClass;
    }

    public WhereCondition(String table, String column, String relationShip, Object value, Class valueClass) {
        condition = String.format("`%s`.`%s`%s ?", table, column,relationShip );

        this.value = value;
        this.valueClass = valueClass;
    }

    public WhereCondition and(Object c) {


        String s = " (" + this.toString() + " AND " + c.toString() + ") ";

        return new WhereCondition(s);
    }

    public WhereCondition or(Object c) {

        String s = " (" + this.toString() + " OR " + c.toString() + ") ";

        return new WhereCondition(s);
    }


    @Override
    public String toString() {


        return condition;

    }
*/
    public static void main(String[] args) {
        /*
        WhereCondition c = new WhereCondition("user", "userId", "=", "1", Integer.class);
        WhereCondition c2 = new WhereCondition("user", "userName", "=", "didyhu", String.class);
        WhereCondition c3 = new WhereCondition("user", "niceName", "=", "didyhu", String.class);
        WhereCondition c4 = new WhereCondition("user", "niceName", "=", "didyhu", String.class);
        c.and(c2.or(c3));
        c4.and(c);
        System.out.println(c.and(c2.or(c3)));*/
        Object o=new Integer(23);
        System.out.println(o.getClass().getSimpleName());
        
    }

}

